package com.zt.teacher.service;

import com.zt.common.pojo.homework.Homework;
import com.zt.common.pojo.homework.HomeworkAnswer;
import com.zt.teacher.dto.HomeworkInfoDTO;
import com.zt.teacher.dto.HomeworkWithClassDTO;
import com.zt.teacher.dto.SummaryDTO;
import org.springframework.context.annotation.Lazy;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;

/**
 * description:
 * author:zt
 * date:2022-02-10
 */
public interface HomeworkService {

    int insert(Homework homework);

    List<Homework> getByClassId(HttpServletRequest request, int classId);

    ArrayList<HomeworkInfoDTO> getHomeworkAndAnswer(HttpServletRequest request, int classId);

    List<HomeworkWithClassDTO> getBySemester(HttpServletRequest request, String semester);

    Homework getByHomeworkId(HttpServletRequest request, int homeworkId);

    void delete(HttpServletRequest request, int homeworkId);

    void markHomework(HttpServletRequest request, HomeworkAnswer homeworkAnswer);

    List<SummaryDTO> getSummaryByClassId(int classId);

    HomeworkAnswer getScoreByStuId(String studentId, int homeworkId);
}
